<?php if (!empty($item)): ?>
<?php $destination = drupal_get_destination(); ?>
<div class="locked-item">
    <div class="item-img item-info">
        <?php $img_uri = !empty($item->field_images[LANGUAGE_NONE][0]['uri'])
            ? $item->field_images[LANGUAGE_NONE][0]['uri'] : '';?>
        <?php print theme('image_style', array('path' => $img_uri, 'style_name' => 'crop_150x150'));?>
    </div>
    <div class="item-info item-name"><?php print l($item->title, 'node/' . $item->nid);?></div>
    <?php $status = !empty($item->field_item_status[LANGUAGE_NONE][0]['value']) ? $item->field_item_status[LANGUAGE_NONE][0]['value'] : 1;?>
    <?php switch ($status):
            case 2:
                $class = 'item-packing-soon';
                $text = t('Packing Soon');
                break;
            case 3:
                $class = 'item-ready-payment';
                $text = t('Waiting payment');
                break;
            case 4:
                $class = 'item-shipping-soon';
                $text = t('Shipping soon');
                break;
            case 5:
                $class = 'item-shipped';
                $text = t('Shipped');
                break;
            default:
                $class = 'item-checked-in';
                $text = t('Checked in');
                break;
          endswitch; ?>
        <div class="item-info item-status <?php print $class;?>"><?php print $text;?></div>
        <div class="item-info item-action">
            <?php if (empty($_SESSION['cart'][$item->nid]) && $item->field_item_status[LANGUAGE_NONE][0]['value'] == 1): ?>
            <?php print l('<i class="icon-shopping-cart"></i> Add to cart', 'cart/item/' . $item->nid . '/add', array('html' => true, 'attributes' => array('class' => array('btn')), 'query' => $destination)); ?>
            <?php else: ?>
            <?php print l('<i class="icon-eye-open"></i> View  ', 'node/' . $item->nid, array('html' => true, 'attributes' => array('class' => array('btn')))); ?>
            <?php endif; ?>
        </div>
</div>
<?php endif;
        ?>